import Vue from 'vue'
import App from './App.vue'
Vue.config.productionTip = false

const role = "admin"

Vue.directive("role",{
  bind(el,binding){
    // console.log(el,binding);
    console.log("bind");
  },
  inserted(el,binding){
    // console.log(el,binding);
    console.log("inserted");
    if(binding.value !== role){
      console.log(el,"111");
      el.remove()
    }

  },
  update(el,binding){
    // console.log(el,binding);
    console.log("update");

  },
  componentUpdated(el,binding){
    // console.log(el,binding);
    console.log("componentUpdatad");

  },
  unbind(el,binding){
    // console.log(el,binding);
    console.log("unbind");

  }
})
new Vue({
  render: h => h(App),
}).$mount('#app')
